Design and Analysis of Hashing Algorithms with Cache Eeects
نویسندگان
چکیده
This paper investigates the performance of hashing algorithms by both an experimental and an analytical approach. We examine the performance of three classical hashing algorithms: chaining, double hashing and linear probing. Our experimental results show that, despite the theoretical superiority of chaining and double hashing, linear probing outperforms both for random lookups. We explore variations on the data structures used by these traditional algorithms to improve their spatial locality and hence cache performance. Our results also help determine the optimal table size for a given key set size. In addition to time, we also study the average number of probes and cache misses incurred by these algorithms. For most of the algorithms studied in this paper, our analysis agrees with the experimental results. As a supplementary result, we examine the behavior of random lookups to a hash table. This provides a simple way to estimate the cache miss penalties of diierent machines. Two conclusions can be drawn from this study. First, cache eeects have a signiicant innuence on the performance of hashing algorithms. Second, it is possible to predict fairly accurately the performance of diierent hashing algorithms based on the algorithm conngurations and cache structures.
منابع مشابه
Graph and Hashing Algorithms for Modern Architectures : Design and Performance 391
We study the eeects of caches on basic graph and hashing algorithms and show how cache eeects innuence the best solutions to these problems. We study the performance of basic data structures for storing lists of values and use these results to design and evaluate algorithms for hashing, Breadth-First-Search (BFS) and Depth-First-Search (DFS). For the basic data structures we show that array-bas...
متن کاملGraph and Hashing Algorithms for Modern Architectures: Design and Performance
We study the eeects of caches on basic graph and hashing algorithms and show how cache eeects innuence the best solutions to these problems. We study the performance of basic data structures for storing lists of values and use these results to design and evaluate algorithms for hashing, Breadth-First-Search (BFS) and Depth-First-Search (DFS). For the basic data structures we show that array-bas...
متن کاملEffect of cache lines in array-based hashing algorithms
Hashing algorithms and their efficiency is modeled with their expected probe lengths. This value measures the number of algorithmic steps required to find the position of an item inside the table. This metric, however, has an implicit assumption that all of these steps have a uniform cost. In this paper we show that this is not true on modern computers, and that caches and especially cache line...
متن کاملProgram Analysis for Cache Coherence: Beyond Procedural Boundaries
The presence of procedures and procedure calls introduces side eeects, which complicates the analysis of stale reference detection in compiler-directed cache coherence schemes 6, 4, 8]. Previous compiler algorithms use cache invalidation at procedure boundary 5, 7] or inlining 7] to avoid reference marking interprocedurally. However, frequent cache invalida-tions will result in poor performance...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1998